﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.hive;

namespace SharpSqlAnalyzer.stmt.hive
{
	// Token: 0x020001B7 RID: 439
	public class THiveCreateRole : TCustomSqlStatement
	{
		// Token: 0x06000EA0 RID: 3744 RVA: 0x0030A501 File Offset: 0x00308701
		public THiveCreateRole(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.ssthiveCreateRole;
		}

		// Token: 0x170002A6 RID: 678
		// (get) Token: 0x06000EA1 RID: 3745 RVA: 0x0030A515 File Offset: 0x00308715
		// (set) Token: 0x06000EA2 RID: 3746 RVA: 0x0030A51D File Offset: 0x0030871D
		public virtual TObjectName RoleName
		{
			get
			{
				return this.roleName;
			}
			set
			{
				this.roleName = value;
			}
		}

		// Token: 0x06000EA3 RID: 3747 RVA: 0x0030A526 File Offset: 0x00308726
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			this.rootNode = ((THiveCreateRoleSqlNode)this.rootNode).RoleName;
			return 0;
		}

		// Token: 0x06000EA4 RID: 3748 RVA: 0x0030A551 File Offset: 0x00308751
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000EA5 RID: 3749 RVA: 0x0030A561 File Offset: 0x00308761
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001338 RID: 4920
		private TObjectName roleName;
	}
}
